<?php

namespace App\Transformers\CourseStudent;

use App\Models\CourseStudentModel;
use League\Fractal\TransformerAbstract;

class ListTransformer extends TransformerAbstract
{
    public function transform(CourseStudentModel $courseStudent) {
        $users = $courseStudent->users;
        return [
            'users'    => handleOne($users, ['id', 'username']),
        ];
    }

}